package com.syh.jn.scm.service.impl.upstream.finance;

import cn.redscarf.commons.wrapper.Wrapper;
import com.alibaba.dubbo.config.annotation.Service;
import com.syh.jn.scm.domain.downstream.repository.finance.DownBusinessAccountRecordRepository;
import com.syh.jn.scm.domain.upstream.repository.finance.UpBusinessAccountRecordRepository;
import com.syh.jn.scm.dto.downstream.finance.DownBusinessAccountRecordVo;
import com.syh.jn.scm.dto.upstream.finance.UpBusinessAccountRecordVo;
import com.syh.jn.scm.service.api.downstream.finance.DownBusinessAccountRecordService;
import com.syh.jn.scm.service.api.upstream.finance.UpBusinessAccountRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 下游应收应付记录
 */
@Service
@Transactional
public class UpBusinessAccountRecordServiceImpl implements UpBusinessAccountRecordService {

  @Autowired
  private UpBusinessAccountRecordRepository upBusinessAccountRecordRepository;

  @Override
  public List<UpBusinessAccountRecordVo> findListPage(Wrapper wrapper, Integer startRow, Integer count) {
    return upBusinessAccountRecordRepository.findListPageView(wrapper, startRow, count);
  }

  @Override
  public int getCount(Wrapper wrapper) {
    return this.upBusinessAccountRecordRepository.getCountView(wrapper);
  }
}
